<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="com/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="com/bootstrap3/dist/js/jquery.js"></script>
	<script type="text/javascript" src="com/bootstrap3/dist/js/bootstrap.js"></script>
	<link href="com/bootstrap3/dist/css/bootstrap.css" rel="stylesheet" />
	<link href="com/css/index.css" rel="stylesheet" type="text/css">
	<style type="text/css">
		.face{
			width: 250px;
			height: 90px;
			position: absolute;
			right: 10px;
			top: 5px;
		}
		.face img{
			height: 60px;
		}
		.face div{
			position: relative;
			height: 80px;
			border-radius: 5px;
			overflow-y: hidden;
			width: 62px;
			float: left;
			margin-left: 10px;
			text-align: right;
			font-weight: 700;
			font-family: '微软雅黑';
			color: #999;
		}
		.face .face_radio{
			position: absolute;
			left: 3px;
			bottom: 4px;
		}
		.form-horizontal{
			position: relative;
		}
	</style>
	<title>留言本</title>
</head>
<body>

	<div id="main">
		<div class='content'>
				
<?php   
	   foreach($this->db as $k=>$v){
	   	
			echo <<<h
						<dl>
					<dt>
						<img src="{$v['tupian']}"/>
					</dt>
					<dd class='head'>
						<span>{$v['name']}</span> <i>性别<span id='xingbie'> {$v['sex']}</span><span></span></i><b>发表于：</b> <i>{$v['time']}</i>
					</dd>
					<dd class='con'>
						留言内容
						<br>
						{$v['say']}
						<div style="float: right;">						
							<a href="index.php?a=ed&key={$k}" class="btn btn-info">修改</a>
							<a href="index.php?a=del&key={$k}" class="btn btn-danger del">删除</a>
							
						</div>
					</dd>
				</dl>		
		
h;
	   }
	
?>
				
		
		</div>


		<div class='form'>
			<form class="form-horizontal" action="index.php?a=put" method="post">
				<div class="control-group">
					<label class="control-label" for="inputEmail">昵称:</label>
					<div class="controls">
						<input type="text" name="username" placeholder="请输入你的昵称.."></div>
				</div>
				<div class="control-group">
					<input type="radio" name="sex" id="" value="男" checked="checked">
					男
					<input type="radio" name="sex" id="" value="女">女</div>
				<div class="control-group">
					<label class="control-label" for="inputPassword">留言内容：</label>
					<div  class="controls">
						<textarea   name="content"></textarea>
					</div>
				</div>
				<div class="face">
					<div>
						<img src="com/images/1.jpg" alt="">
						<input type="radio" name="face" class="face_radio" checked="checked" value="com/images/1.jpg">
						头像1
					</div>
					<div>
						<img src="com/images/2.jpg" alt="">
						<input type="radio" name="face" class="face_radio" value="com/images/2.jpg">
						头像2
					</div>
					<div>
						<img src="com/images/3.jpg" alt="">
						<input type="radio" name="face" class="face_radio" value="com/images/3.jpg">
						头像3
					</div>
				</div>
				<div class="control-group">
					<div class="controls">
						<button type="submit" class="btn btn-primary">给我留言</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>